package com.ruoyi.web.controller.manage;

import com.ruoyi.system.domain.vo.ComingOutRequest;
import com.ruoyi.system.domain.vo.ComingOutVO;
import com.ruoyi.system.domain.vo.Result;
import com.ruoyi.system.service.ComingOutService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/api/coming-out")
public class ComingOutController {

    @Autowired
    private ComingOutService comingOutService;

    @PostMapping
    public Result<Void> handleOperation(@RequestBody ComingOutRequest request) {
        comingOutService.handleOperation(request);
        return Result.success();
    }

    @GetMapping
    public Result<List<ComingOutVO>> getStockList() {
        return Result.success(comingOutService.getStockList());
    }
}
